package org.shunfeng;

import org.shunfeng.dao.CompanyDao;
import org.shunfeng.dao.impl.CompanyDaoImpl;
import org.shunfeng.pojo.Company;
import org.shunfeng.service.CompanyService;
import org.shunfeng.service.impl.CompanyServiceImpl;

import java.sql.SQLException;
import java.util.List;

public class test {
    public static void main(String[] args) {
        CompanyService companyService = new CompanyServiceImpl();
//        CompanyDao companyDao = new CompanyDaoImpl();
        try {
            List<Company> companies = companyService.queryAllCompany();
            for (Company company : companies){
                System.out.println(company.toString());
            }
        } catch (SQLException e) {
            throw new RuntimeException(e);
        }
    }
}
